<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link href="../css/together.css" rel="stylesheet" />
		<style>
			.mui-table-view-cell>a:not(.mui-btn){margin:0;}
			.nickname{ min-height:60px;}
		</style>
	</head>

	<body>
		
		
		<header class="mui-bar mui-bar-nav m_barC">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title">成员列表</h1>
		</header>
		<div class="mui-content">
		<div class=" member_list" id="memberlistid">
			<!--
            	作者：592176224@qq.com
            	时间：2019-01-19
            	描述：
           
			<ul class="mui-table-view m_color setl0">
			    <li class="mui-table-view-cell setl0 ">
			    	   <img class="mui-media-object mui-pull-left" src="../images/logo.png">
			        <a class=" mui-media-body ">成员1
			        	<span class="originator">发起人</span>
			        </a>  
			    </li>
			    <li class="mui-table-view-cell ">
			    	<img class="mui-media-object mui-pull-left" src="../images/logo.png">
			        <a class="mui-media-body ">成员2 <span class="transfer">转给他/她</span></a>
			    </li>
		    
			</ul>
			 -->
		</div>
		</div>
		<script src="../js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/mui.min.js"></script>
		<script src="../js/req.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/muishow.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			var mlist = [],bid = 0;
			window.onload = function(){ 
				mui.init();
				bid = getrequest().bid;
				mui.plusReady(function(){
					let view =  plus.webview.currentWebview();
					bid = view.bid;
				})
				setmemberlist();
			}
			
			function setmemberlist(){
				let data = {
					url:"/api/Book/book_author",
					data:{
						access_token:acctoken(),
						bid:bid,
					}
				}
				ajax(data,function(res){
					console.log(res);
					let mlist = res.data;
					let str = '<ul class="mui-table-view m_color setl0">';
				for(let i = 0; i < mlist.length;i++){
					console.log(mlist[i].path.length);
					if(i == 0){
						str +=  '<li class="mui-table-view-cell setl0 ">';
						if(mlist[i].path.length > 27){
							str += '<img class="mui-media-object mui-pull-left" src="'+mlist[i].path+'">';
						}else{
							str += '<img class="mui-media-object mui-pull-left" src="../images/user-photo.png">';
						}
			        str +='<a class=" mui-media-body nickname">'+
			        mlist[i].nickname +
			        	'<span class="originator">发起人</span></a></li>';
					}else{
						str+='<li class="mui-table-view-cell ">';
						
						if(mlist[i].path.length > 27){
							str+='<img class="mui-media-object mui-pull-left" src="'+mlist[i].path+'">';
						}else{
							str+='<img class="mui-media-object mui-pull-left" src="../images/user-photo.png">';
						}
			         str +='<a class="mui-media-body nickname">'+
			        mlist[i].nickname +
			        '<span class="transfer" onclick="settransfer('+mlist[i].id+')">转给他/她</span></a></li>';
					}
				}
				str += '</ul>'
				g("memberlistid").innerHTML = str;
				})
				
			}
			
			function settransfer(uid){
				console.log("id",id);
				
			}
		</script>
	</body>

</html>